package com.allwees.bs.core.model.user.constant;

import com.baomidou.mybatisplus.core.enums.IEnum;

public enum EInfluencerType implements IEnum<String> {

    INFLUENCER(1, "是"),

    NOTINFLUENCER(0, "否");

    private int type;

    private String desc;

    EInfluencerType(int type, String desc) {
        this.type = type;
        this.desc = desc;
    }

    public int type() {
        return type;
    }

    public String desc() {
        return desc;
    }


    @Override
    public String getValue() {
        return name();
    }



    public static  EInfluencerType getEInfluencerType(Integer type ) {
        if(type == null){
            return null;
        }
        EInfluencerType[] eInfluencerTypes = values();
        int length = eInfluencerTypes.length;
        for (EInfluencerType e : eInfluencerTypes) {
            if (e.type == type) {
                return e;
            }
        }

            throw new IllegalArgumentException("No EInfluencerType enum found by value[" + type + "]");

    }
}
